package dst.graph;

import java.util.Iterator;

/**
 *
 * @author Shimu
 * @date 3-Oct-2012
 */
public interface GraphNodeInterface<T> {

    /**
     * Returns the data stored in this GraphNodeInterface
     * @return 
     */
    public T getData();

    /**
     * Set the data stored in this GraphNodeInterface
     * @param newData 
     */
    public void setData(T newData);

    /** Returns true if this GraphNode stores the given data */
    public boolean hasData(T data);

    /**
     * Add a neighbour with the given data to this GraphNodeInterface. The
     * GraphNodeInterface Object representing the new neighbour is returned.
     * @param data
     * @return 
     */
    public GraphNodeInterface<T> addNeighbour(T data);

    /** 
     * Remove the neighbour with the given data from this GraphNodeInterface 
     */
    public GraphNodeInterface<T> removeNeighbour(T data);

    /** Returns an iterator over the neighbours of this GraphNodeInterface */
    public Iterator<? extends GraphNodeInterface<T>> getNeighbours();
}
    /**
     * Add the given neighbour to this GraphNodeInterface
     * @param neighbour 
     
    public void addNeighbour(GraphNodeInterface<T> neighbour);
    
    /** 
     * Remove the given neighbour from this GraphNodeInterface 
     
    public boolean removeNeighbour(GraphNodeInterface<T> neighbour);
    */